package study;

/**
 * @author feng
 * @Date 2021/10/21 9:58
 *   注意for循环，+1之后条件不满足，退出循环并返回当前值
 */
public class ForTest {
    public static void main(String[] args) {
        int sum = 0;
         int i = 0;
        for ( i = 0; i <2 ; i++) {
              sum =+ i;
            System.out.println("循环"+i);
            System.out.println("循环"+sum);
        }
        System.out.println(sum);
        System.out.println(i);
    }

}
